package org.NooLab.randomgraph.properties;

import org.NooLab.randomgraph.util.FileOrganizer;
import org.NooLab.structures.randomgraph.PersistenceSettingsIntf;




public class PersistenceSettings implements PersistenceSettingsIntf{

	RGraphProperties rGraphProperties;
	

	String systemRootDir ="";
	private String projectName = "";

	
	String dbUser     = "rg" ;
	String dbpassword = "rg" ;
	String databaseName = "rg-fingerprints" ;
	
	
	transient FileOrganizer fileOrganizer ;
	
	
	// ========================================================================
	public PersistenceSettings( RGraphProperties rGraphProperties, FileOrganizer fileOrg){
		fileOrganizer = fileOrg;
		this.rGraphProperties = rGraphProperties;
		fileOrganizer.setPersistence((PersistenceSettingsIntf) this) ;
	}
	// ========================================================================


	public void setProjectName(String string) {
		 
		projectName  = string;
		fileOrganizer.update();
	}


	/**
	 * @return the projectName
	 */
	public String getProjectName() {
		return projectName;
	}



	public String getPathToSystemRootDir() {
		 
		return null;
	}



	public String getPathToSomFluidSystemRootDir() {
		
		if (systemRootDir.length()==0){
			
		}
		return systemRootDir;
	}


	public String getDbUser() {
		return dbUser;
	}


	public void setDbUser(String dbUser) {
		this.dbUser = dbUser;
	}


	public String getDbpassword() {
		return dbpassword;
	}


	public void setDbpassword(String dbpassword) {
		this.dbpassword = dbpassword;
	}


	public String getDatabaseName() {
		return databaseName;
	}


	public void setDatabaseName(String databaseName) {
		this.databaseName = databaseName;
	}


	public RGraphProperties getrGraphProperties() {
		return rGraphProperties;
	}


	public String getSystemRootDir() {
		return systemRootDir;
	}


	public FileOrganizer getFileOrganizer() {
		return fileOrganizer;
	}
}
